// 安全检查相关
import requestInstance from '../utils/request';
const http = requestInstance();
// 查询企业的列表
export function selectEnterpriseList(data) {
  data.logintoken = wx.getStorageSync("userinfo").logintoken
  return http.request({
    url: '/wechatApi/selectEnterpriseList',
    method: 'get',
    data: data
  })
}
// 查询当前企业整改的列表
export function selectChecList(data) {
  data.logintoken = wx.getStorageSync("userinfo").logintoken
  return http.request({
    url: '/wechatApi/selectChecList',
    method: 'get',
    data: data
  })
}

// 保存检查项目填报
export function saveCheckInfo(data) {
  data.logintoken = wx.getStorageSync("userinfo").logintoken
  return http.request({
    url: '/wechatApi/saveCheckInfo',
    method: 'get',
    data: data
  })
}
// 获取详情
export function getChecInfo(data) {
  data.logintoken = wx.getStorageSync("userinfo").logintoken
  return http.request({
    url: '/wechatApi/getChecInfo',
    method: 'get',
    data: data
  })
}
// 审核跟新检查项目填报
export function updateCheckBusiness(data) {
  data.logintoken = wx.getStorageSync("userinfo").logintoken
  return http.request({
    url: '/wechatApi/updateCheckBusiness',
    method: 'post',
    data: data
  })
}
// 查询整改企业列表
export function selectCheckInfoBusinessList(data) {
  data.logintoken = wx.getStorageSync("userinfo").logintoken
  return http.request({
    url: '/wechatApi/selectCheckInfoBusinessListZG',
    method: 'get',
    data: data
  })
}
//暂存
export function selectCheckBusinessListZC(data) {
  data.logintoken = wx.getStorageSync("userinfo").logintoken
  return http.request({
    url: '/wechatApi/selectCheckBusinessListZC',
    method: 'get',
    data: data
  })
}

// 查询审核企业列表
export function selectCheckInfoBusinessListSH(data) {
  data.logintoken = wx.getStorageSync("userinfo").logintoken
  return http.request({
    url: '/wechatApi/selectCheckInfoBusinessList',
    method: 'get',
    data: data
  })
}
// 查询企业检查详细信息
export function queryCheckDetail(data) {
  data.logintoken = wx.getStorageSync("userinfo").logintoken
  return http.request({
    url: '/wechatApi/selectCheckInfoBusinessList',
    method: 'get',
    data: data
  })
}
// 查询整改企业表单
export function getCheckInfoBusinessById(data) {
  data.logintoken = wx.getStorageSync("userinfo").logintoken
  return http.request({
    url: '/wechatApi/getCheckInfoBusinessById',
    method: 'get',
    data: data
  })
}
//整改类型、结果下拉框
export function getCSBList(data) {
  data.logintoken = wx.getStorageSync("userinfo").logintoken
  return http.request({
    url: '/EncodeController/getCSBList',
    method: 'get',
    data: data
  })
}
//整改保存
export function saveZGCheckBusinessInfo(data) {
  return http.request({
    url: '/wechatApi/saveZGCheckBusinessInfo',
    method: 'get',
    data: data
  })
}
// 新闻资讯
export function selectNews(data) {
  data.logintoken = wx.getStorageSync("userinfo").logintoken
  return http.request({
    url: '/personalApi/selectNews',
    method: 'get',
    data: data
  })
}
// 列表
export function datalist(data, url) {
  data.logintoken = wx.getStorageSync("userinfo").logintoken
  return http.request({
    url: '/wechatApi/' + url,
    method: 'get',
    data: data
  })
}
// 列表
export function datalistNew(data, url) {
  data.logintoken = wx.getStorageSync("userinfo").logintoken
  return http.request({
    url: '/wechatApi/' + url,
    method: 'get',
    data: data
  })
}
// 新闻详情
export function selectNewsXq(data, url) {
  data.logintoken = wx.getStorageSync("userinfo").logintoken
  return http.request({
    url: '/personalApi/' + url,
    method: 'get',
    data: data
  })
}
// 通知
export function selectTz(data) {
  data.logintoken = wx.getStorageSync("userinfo").logintoken
  return http.request({
    url: '/personalApi/selectTz',
    method: 'get',
    data: data
  })
}
// 信息详情
export function selectPersonal(data) {
  data.logintoken = wx.getStorageSync("userinfo").logintoken
  return http.request({
    url: '/personalApi/selectPersonal',
    method: 'get',
    data: data
  })
}
// 信息详情修改
export function SavePersonal(data) {
  data.logintoken = wx.getStorageSync("userinfo").logintoken
  return http.request({
    url: '/personalApi/SavePersonal',
    method: 'post',
    data: data
  })
}
// 密码修改
export function EditPassowrd(data) {
  data.logintoken = wx.getStorageSync("userinfo").logintoken
  return http.request({
    url: '/personalApi/EditPassowrd',
    method: 'get',
    data: data
  })
}
//登录
export function userLogin(data) {
  return http.request({
    url: '/loginVx/api/userLogin',
    method: 'get',
    data: data
  })
}
//检查列表
export function getChecList(data) {
  data.logintoken = wx.getStorageSync("userinfo").logintoken
  return http.request({
    url: '/wechatApi/getChecList',
    method: 'get',
    data: data
  })
}
//保存检查数据接口 gyk
export function saveCheckBusiness(data) {
  data.logintoken = wx.getStorageSync("userinfo").logintoken
  return http.request({
    url: '/wechatApi/saveCheckBusiness',
    method: 'post',
    data: data
  })
}
export function checkListByCode() {
  return http.request({
    url: '/wechatApi/checkListByCode',
    method: 'get',
    data: {
      logintoken: wx.getStorageSync("userinfo").logintoken
    }
  })
}
// 获取企业信息
export function getQyInfo(data) {
  data.logintoken = wx.getStorageSync("userinfo").logintoken
  return http.request({
    url: '/wechatApi/getQyInfo',
    method: 'get',
    data
  })
}
// 获取区-街道的数据
export function getQHJDList() {
  return http.request({
    url: '/EncodeController/getQHJDList',
    method: 'get',
    data: {
      logintoken: wx.getStorageSync("userinfo").logintoken
    }
  })
}
// 获取法律法规的数据
export function getFLFGList(data) {
  data.logintoken = wx.getStorageSync("userinfo").logintoken
  return http.request({
    url: '/wechatApi/selectFLFGList',
    method: 'get',
    data: data
  })
}
 